﻿using Mes.Pendant.Workstation.Dto;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Dynamic.Core;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Services;

namespace Mes.Pendant.Workstation.IAppService
{
	public interface IWorkstationAppService : IApplicationService
	{
		/// <summary>
		/// 工作站列表、分页、查询
		/// </summary>
		/// <param name="workstationName">工作站名称</param>
		/// <param name="page">当前页</param>
		/// <param name="limit">每页条数</param>
		/// <returns>工作站列表数据</returns>
		Task<PagedResult> GetWorkstationList(string? workstationName, int page = 1, int limit = 10);

		/// <summary>
		/// 新增工作站
		/// </summary>
		/// <param name="addWorkstationDto">新增工作站实体</param>
		/// <returns>实体自增主键</returns>
		Task<int> AddWorkstation(AddWorkstationDto addWorkstationDto);
		
		/// <summary>
		/// 删除工作站
		/// </summary>
		/// <param name="id">实体主键</param>
		/// <returns>受影响的行数</returns>
		Task<int> RemoveWorkstationById(int id);

		/// <summary>
		/// 查看工作站详情
		/// </summary>
		/// <param name="id">工作站主键</param>
		/// <returns>工作站实体</returns>
		Task<EditWorkstationDto> FindWorkstationById(int id);

		/// <summary>
		/// 更新工作站
		/// </summary>
		/// <param name="editWorkstationDto">更新工作站实体</param>
		/// <returns>受影响的行数</returns>
		Task<int> UpdateWorkstation(EditWorkstationDto editWorkstationDto);

		Task<List<WorkstationListDto>> GetWorkstationListRedis();


	}
}
